package com.Java.train.business.controller.member;

import com.Java.train.business.entity.DTO.DailyTrainTicketDTO;
import com.Java.train.business.req.daily.DailyTrainTicketQueryReq;
import com.Java.train.business.service.daily.DailyTrainTicketService;
import com.Java.train.common.response.CommonResp;
import com.Java.train.common.response.PageResp;
import io.swagger.annotations.ApiOperation;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* @author luomoxingchen
* @since 2024-10-01
*/
@RestController
@RequestMapping("/daily-train-ticket")
public class TrainTicketController {

    @Autowired
    private DailyTrainTicketService dailyTrainTicketService;


    @GetMapping("/query-list")
    @ApiOperation("DailyTrainTicket查询全部")
    public CommonResp< PageResp<DailyTrainTicketDTO>> queryList(@Valid DailyTrainTicketQueryReq dailyTrainTicketQueryReq){
        PageResp<DailyTrainTicketDTO> list = dailyTrainTicketService.queryList(dailyTrainTicketQueryReq);
        return new CommonResp<>(list);
    }

}
